package com.xuecheng.framework.exception;

import com.xuecheng.framework.model.response.ResultCode;

// 自定义异常类型, 继承RuntimeException, 是因为在运行的时候对代码没有可侵入性
public class CustomException extends RuntimeException {

    // 错误代码
    ResultCode resultCode;

    // 错误代码通过构造方法指定
    public CustomException(ResultCode resultCode){
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode(){
        return resultCode;
    }


}
